import cv2 as cv
import numpy as np
from 显示图像 import my_img_show

image = cv.imread("new.jpg")
my_img_show("price", image[100:500, 0:500])
cur_img=image.copy()

#imagebgr = cv.merge([b, g, r])
cur_img[:, :, 1]=0
cur_img[:, :, 2]=0
my_img_show(cur_img)
#shape = image.shape
b,g,r = cv.split(image)
#和图像一样大小的0矩阵
zero_shape = np.zeros(image.shape[:2]).astype("uint8")
imager = cv.merge([zero_shape, zero_shape, r])
#image_1 = np.random.randint(0,256,size = shape,dtype=np.uint8)
my_img_show(cur_img)